package com.dachuang.canjiren.controller;


import com.dachuang.canjiren.service.CommentService;
import com.dachuang.canjiren.service.RoleService;
import com.dachuang.common.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author testjava
 * @since 2020-07-27
 */
@RestController
@RequestMapping("/canjiren/role")
public class RoleController {
    @Autowired
    private RoleService roleService;

    @GetMapping(value = "insertRole")
    R insertRole(@RequestParam(value = "roleName", required = false) String roleName) {
        return roleService.insertRole(roleName);
    }
    @GetMapping("selectRole")
    R selectRole(Integer id){
        return roleService.selectRole(id);
    }
}

